<!DOCTYPE HTML>

<html lang="pt-br"  
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	
<ui:composition template="/view/PainelAdministrador.xhtml">
<ui:define name="corpo">
<style type="text/css">
.form-signin 
{
	max-width: 250px;
	padding: 19px 29px 29px;
    margin: 0 auto 20px;
    background-color: #fff;
    border: 1px solid #e5e5e5;
    -webkit-border-radius: 5px;
    	-moz-border-radius: 5px;
        	border-radius: 5px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
    	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
        	box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
</style>
<div class="container">
	<h:form id="form" class="form-signin">
		<p:growl id="mensagem" showDetail="true" sticky="true" />
		
		<h3 class="form-signin-heading">Incluir Usuário</h3>
				
		<div class="control-group">
			<div class="controls">
				<p:inputText id="inputLogin" 
							required="true"
							maxlength="50" 
							requiredMessage="Informe login."
							value="#{usuarioManagerBean.usuarioBean.login}" 
							styleClass="input-block-level"/>
				<p:watermark value="Login" 
							for="inputLogin"/>
			</div>
		</div>
		
		<div class="control-group">
			<div class="controls">
				<p:password id="inputSenha" 
							required="true"
							maxlength="50" 
							requiredMessage="Informe Senha."
							validatorMessage="Senha e confirmação de senha devem ser iguais"
							value="#{usuarioManagerBean.usuarioBean.senha}"
							match="inputSenhaConfirmacao" 
							styleClass="input-block-level"/>
				<p:watermark value="Senha" 
							for="inputSenha"/>
			</div>
		</div>
		
		<div class="control-group">
			<div class="controls">
				<p:password id="inputSenhaConfirmacao" 
							required="true"
							maxlength="50" 
							requiredMessage="Informe Confirmação de Senha."
							value="#{usuarioManagerBean.usuarioBean.senha}" 
							styleClass="input-block-level"/>
				<p:watermark value="Confirmação de Senha" 
							for="inputSenhaConfirmacao"/>
			</div>
		</div>
		
		<div class="control-group">
			<div class="controls">
				<p:inputText id="inputNome" 
							required="true"
							maxlength="50" 
							requiredMessage="Informe Nome."
							value="#{usuarioManagerBean.usuarioBean.nome}" 
							styleClass="input-block-level"/>
				<p:watermark value="Nome" 
							for="inputNome"/>
			</div>
		</div>
		
		<div class="control-group">
			<div class="controls">
				<p:inputText id="inputSobrenome" 
							required="true"
							maxlength="100" 
							requiredMessage="Informe Sobrenome."
							value="#{usuarioManagerBean.usuarioBean.sobrenome}" 
							styleClass="input-block-level"/>
				<p:watermark value="Sobrenome" 
							for="inputSobrenome"/>
			</div>
		</div>
		
		<div class="control-group">		
					<p:commandButton id="btnCadastrar" 
									value="Incluir" 
									styleClass="btn btn-block btn-info" 
									actionListener="#{usuarioManagerBean.incluir}" 
									update="mensagem"/>
				</div>
	</h:form>
</div>


</ui:define>
</ui:composition>
</html>